package org.nanotek.lucene.document;

import java.util.List; // Sample Simple.


/**
 *  Thus, the InstanceManagerPattern.
 *  An instance manager is a class/object which serves to manage instance(s)
 *  of some other type of object, and provide a point of access to the instances
 *  being managed. Such a class should generally have the following methods:
 *  Ability to set the number of instances being managed
 *  Ability to place an instance of whatever is being managed under management.
 *  (Note that the ability to construct instances of the singleton is not constrained,
 *  just the ability to manage them).
 *  Ability to look up one or more instances (via a key) of the managed object(s).
 *  If only one managed object, then a key is not necessary.
 *  Optionally, the ability to remove an object from management
 *  (which does not cause the object's destruction).
 *  @author josecanova
 *
 * @param <T> The T Document Type.
 * @param <K> an  K Key instance.
 */
public interface DocumentManager <T,K>{

	public T createDocument (K parameters);
	public List<T> getDocuments (K key);
	public T getDocument(K key); // throws unicity exception...
	public void deleteDocument(K key);

}
